function test_1() {
    if (0) {
        console.log("0 is true");
    } else {
        console.log("0 is false");
    }
    if (1) {
        console.log("1 is true");
    }
}

function test_2() {
    console.log(null || 1); //1
    console.log(null ?? 1); //1

    console.log(undefined || 1); //1
    console.log(undefined ?? 1); //1

    console.log(0 || 1); //1
    console.log(0 ?? 1); //0
}

function test_equal() {
    const list1 = [1, 2, "abc", 3];
    const list2 = [1, 2, "abc", 3];
    const list3 = [2, 1, "abc", 3];
    const list4 = ["1", 2, "abc", 3];

    console.log("1:2", list1 == list2);
    console.log("1:3", list1 == list3);
    console.log("1:4", list1 == list4);
    console.log("2:3", list2 == list3);
    console.log("2:4", list2 == list4);
    console.log("3:4", list3 == list4);
}

/**
 * 单元测试运算符
 */
export function test_operator() {
    // test_1()
    // test_2()
    test_equal();
}
